'''
Created on 2014-03-01

@author: YoYo
'''
if __name__ == '__main__':  
    import socket  
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  
    sock.connect(('localhost', 8001))  
    import time  
    time.sleep(2)  
    sock.send('1'.encode())  
    print(sock.recv(1024))
    sock.close()  